#pragma once
#include<iostream>
#include<string>
#include<ctime>
//日志信息等级
#define INFO 1
#define WARNING 2
#define ERROR 3
#define FATA 4
//错误类型信息
enum ERR{
    ArgErr=1,
    SocketErr,
    BindErr,
    ListenErr,
    AcceptErr
};

#define LOG(level,message) Log(#level,message,__FILE__,__LINE__)
//#的作用是拼接成字符
void Log(const std::string level,const std::string message,const std::string filename,const size_t line)
{
    std::cout<<"["<<level<<"]["<<message<<"]["<<filename<<"]["<<line<<"]"<<std::endl;
}